import java.util.Scanner;

public class Point {
    private int x;
    private int y;
    private int z;
    Scanner scan = new Scanner(System.in);

    public Point(int x, int y, int z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getZ() {
        return z;
    }

    public void setZ(int z) {
        this.z = z;
    }

    public static void main(String[] args) {
        Point p1 = new Point(1,1,1);
        Point p2 = new Point(2,2,2);
        Point p3 = new Point(3,3,3);

        p1.setCoordinate();
        System.out.println("The coordinate of point is " + "("+ p1.x + ","+p1.y +","+ p1.z+")");
        System.out.println("the square of distance to origin point is " + p1.distance(p1.x,p1.y,p1.z));
    }

    public void setCoordinate() {
        System.out.println("Please set the coordinate of the point");
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();

        this.x = a;
        this.y = b;
        this.z = c;

        /*System.out.println("The coordinate of point is" + "("+this.x + ","+this.y +","+ this.z+")");*/
    }

    public int distance(int x, int y, int z) {
        return this.x*this.x+this.y*this.y+this.z*this.z;
    }
}
